import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
import Layout from '@/components/Layout.vue';

// 在框架内展示的子路由
import frameIn from './frameIn';
import frameOut from './frameOut';

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    component: Layout,
    redirect: '/index',
    // frameIn展示的业务页面
    children: [...frameIn],
  },
  // frameOut展示的独立的页面
  ...frameOut,
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
